package cn.com.cym.gamezao.entity.recruit;

import cn.com.cym.gamezao.base.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;
import java.time.LocalDate;

/**
 * 岗位信息
 */
@Setter
@Getter
@NoArgsConstructor
@Entity
@Accessors(chain = true)
@Table(name = "r_job")
@ApiModel(description="招聘岗位信息")
public class Job extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 9012334298696016585L;

    @Column(length = 100)
    private String jobUnit = "厦门大学附属翔安医院";

    /**
     * 主管部门
     */
    @Column(length = 100)
    private String mainDepartment;

    @Column(length = 20)
    @ApiModelProperty(value = "岗位代码",required = true,dataType = "String")
    private String code;

    @Column(length = 200)
    @ApiModelProperty(value = "岗位名称",required = true,dataType = "String")
    private String name;

    @Column(length = 4000)
    @ApiModelProperty(value = "岗位描述",required = true,dataType = "String")
    private String described;


    /**
     * 最大年龄
     */
    @ApiModelProperty(value = "最大年龄",required = true,dataType = "Integer")
    private Integer maxAge;

    /**
     * 性别限制
     */
    @Column(length = 16)
    private String sexLimit;

    /**
     * 岗位类别
     */
    @ApiModelProperty(value = "岗位类别",required = true,dataType = "String")
    private String jobType;

    @ApiModelProperty(value = "岗位级别",required = true,dataType = "String")
    private Integer jobLevel;

    /**
     * 科室
     */
    @ApiModelProperty(value = "科室",required = true,dataType = "String")
    private String department;

    @ApiModelProperty(value = "招聘数",required = true,dataType = "String")
    private Integer nums;
    /**
     * 专业
     */
    @ApiModelProperty(value = "专业",required = true,dataType = "String")
    private String profession;

    /**
     * 人员类别
     */
    @ApiModelProperty(value = "人员类别",required = true,dataType = "String")
    private String personType;

    /**
     * 学士学位
     */
    @ApiModelProperty(value = "学士学位",dataType = "String")
    @Column(length = 200)
    private String bachelorDegree;


    @ApiModelProperty(value = "最低学历",dataType = "String")
    @Column(length = 50)
    private String lowBachelor;

    @ApiModelProperty(value = "最低学位",dataType = "String")
    @Column(length = 50)
    private String lowDegree;


    /**
     * 其他条件
     */
    @ApiModelProperty(value = "其他条件",dataType = "String")
    @Column(length = 2000)
    private String otherCondition;


    /**
     * 发布时间
     */
    @ApiModelProperty(value = "发布时间",required = true,dataType = "LocalDate")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private LocalDate publishDate;

    /**
     * 截至日期
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "截至日期",required = true,dataType = "LocalDate")
    private LocalDate endDate;


    /**
     * 是否发布
     */
    @ApiModelProperty(value = "是否发布",dataType = "boolean")
    private Boolean publish;

    /**
     * 是否截止
     */
    private Boolean closed;

}
